<#include "/lib/macro-lib.ftl"/>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title></title>
</head>
<#include "../inc/commonJs.html">
<script src="${request.contextPath}/js/calendar.js"></script>
<body>
<div align="center" class="easyui-panel" data-options='fit:true,border:false'>
<script>
function formCheck(f){
	if (f.cdate.value == ""){
		alert("请填写创建日期!");
		f.cdate.focus();
		return false;
	}
	if (f.cnum.value == ""){
		alert("请填写初始金额!");
		f.cnum.focus();
		return false;
	}
	if (f.name.value == ""){
		alert("请填写帐户名称!");
		f.name.focus();
		return false;
	}
	if (f.owner.value == ""){
		alert("请填写所有人!");
		f.owner.focus();
		return false;
	}
	if (f.type.value == ""){
		alert("请填写类型!");
		f.type.focus();
		return false;
	}
}
<#if ret??>
  alert('${ret}');
</#if>
</script>
<br>
<table width="98%" border="0" cellpadding="0" cellspacing="0" class="table_all">
<form name="frm" method="post" action="accountaddact.do" onSubmit="return formCheck(this)">
    <tr> 
      <td width="100" class="td_table_1">帐户名称:</td>
      <td width="*" class="td_table_2"> 
        <input type="text" name="name" >
      </td>
    </tr>
    <tr> 
      <td width="100" class="td_table_1">所有人:</td>
      <td width="*" class="td_table_2"> 
        <@radioUtil optName="owner" optVals=owners></@radioUtil>
      </td>
    </tr>
    <tr> 
      <td width="100" class="td_table_1">类型:</td>
      <td width="*" class="td_table_2"> 
        <select name="type" class="easyui-combobox">        
        	<option value="0">现金</option>
        	<option value="1">银行</option>
        </select>
      </td>
    </tr>
    <tr> 
      <td width="100" class="td_table_1">创建日期:</td>
      <td width="*" class="td_table_2"> 
        <input type="text" name="cdate"  onclick="calendar.show(this);">
      </td>
    </tr>
    <tr> 
      <td width="100" class="td_table_1">初始金额:</td>
      <td width="*" class="td_table_2"> 
        <input type="text" name="cnum" >
      </td>
    </tr>
    <tr> 
      <td width="100" class="td_table_1">状态:</td>
      <td width="*" class="td_table_2"> 
        <select name="zt" class="easyui-combobox">        
        	<option value="1">启用</option>
        	<option value="0">禁用</option>
        </select>
      </td>
    </tr>
    <tr> 
      <td width="100" class="td_table_1">排序:</td>
      <td width="*" class="td_table_2"> 
        <input type="text" name="px" size="5">
      </td>
    </tr>
    <tr> 
      <td class="td_table_2">&nbsp;</td>
      <td class="td_table_2"> 
          <input type="submit" class="button_70px" value="保存">&nbsp;&nbsp;&nbsp;&nbsp;
           <input type="button" class="button_70px" value="返回列表" onclick="location.href='accountlist.do'">
      </td>
    </tr>
</form>
</table>
</div>
</body>
</html>